package br.uvv.sao.util;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.primefaces.model.LazyDataModel;

import br.uvv.sao.domain.OfertaDisciplina;
import br.uvv.sao.domain.PalavraChave;
import br.uvv.sao.domain.Prova;
import br.uvv.sao.domain.Questao;
import br.uvv.sao.domain.QuestaoBase;

@SuppressWarnings("serial")
public class InitUtil implements Serializable {

	private static final long serialVersionUID = -6991277051077794737L;
	
	public static LazyDataModel<OfertaDisciplina> inicializaOfertaDisciplinaList(){
		LazyDataModel<OfertaDisciplina> modelList = new LazyDataModel<OfertaDisciplina>() {
			@Override
			public List<OfertaDisciplina> load(int arg0, int arg1, String arg2,
					boolean arg3, Map<String, String> arg4) {
				return new ArrayList<OfertaDisciplina>();
			}
		};
		modelList.setPageSize(5);
		return modelList;
	}
	
	
	public static LazyDataModel<Prova> inicializaProvaList(){
		LazyDataModel<Prova> modelList = new LazyDataModel<Prova>() {
			@Override
			public List<Prova> load(int arg0, int arg1, String arg2,
					boolean arg3, Map<String, String> arg4) {
				return new ArrayList<Prova>();
			}
		};
		modelList.setPageSize(5);
		return modelList;
	}
	
	public static LazyDataModel<QuestaoBase> inicializaQuestaoBaseList(){
		LazyDataModel<QuestaoBase> modelList = new LazyDataModel<QuestaoBase>() {
			@Override
			public List<QuestaoBase> load(int arg0, int arg1, String arg2,
					boolean arg3, Map<String, String> arg4) {
				return new ArrayList<QuestaoBase>();
			}
		};
		modelList.setPageSize(5);
		return modelList;
	}
	
	public static LazyDataModel<Questao> inicializaQuestaoList(){
		LazyDataModel<Questao> modelList = new LazyDataModel<Questao>() {
			@Override
			public List<Questao> load(int arg0, int arg1, String arg2,
					boolean arg3, Map<String, String> arg4) {
				return new ArrayList<Questao>();
			}
		};
		modelList.setPageSize(5);
		return modelList;
	}
	
	public static LazyDataModel<QuestaoBase> initQuestaoBaseList(){
		LazyDataModel<QuestaoBase> modelList = new LazyDataModel<QuestaoBase>() {
			
			@Override
			public List<QuestaoBase> load(int first, int pageSize, String sortField,
					boolean sorteOrder, Map<String, String> arg4) {
				return new ArrayList<QuestaoBase>();
			}
		};
		modelList.setPageSize(5);
		return modelList;
	}

	public static LazyDataModel<PalavraChave> initPalavraChaveList() {
		LazyDataModel<PalavraChave> modelList = new LazyDataModel<PalavraChave>() {
			
			@Override
			public List<PalavraChave> load(int first, int pageSize, String sortField,
					boolean sorteOrder, Map<String, String> arg4) {
				return new ArrayList<PalavraChave>();
			}
		};
		modelList.setPageSize(5);
		return modelList;
	}
}
